From: Georges Basile Stavracas Neto Date: Mon, 25 May 2020 19:52:43 +0000 (-0300) Subject: appDisplay: Compare indicator and grid pages X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~220 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=aa70020bc807ef5d6f4b3a554eb998dcd36cf84a;p=gnome-shell.git appDisplay: Compare indicator and grid pages In the past, the icon grid would update the number of pages during the call to adaptToSize(). However, after the new grid layout landed, the number of pages is updated by the time an item is added or removed. Instead of comparing the old and new number of pages in the icon grid, compare the pages shown by the indicator, and the grid pages. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 2ada45406..ff813f395 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -464,13 +464,12 @@ var BaseAppView = GObject.registerClass({ const availWidth = box.get_width(); const availHeight = box.get_height(); - const oldNPages = this._grid.nPages; this._grid.adaptToSize(availWidth, availHeight); if (this._availWidth !== availWidth || this._availHeight !== availHeight || - oldNPages !== this._grid.nPages) { + this._pageIndicators.nPages !== this._grid.nPages) { Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => { this._adjustment.value = 0; this._grid.currentPage = 0;